package org.xman.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;

@Controller
@RequestMapping("/")
public class IndexController {

	@RequestMapping("/")
	@ResponseBody
	public JSONObject index() {
		JSONObject result = new JSONObject();
		result.put("code", 0);
		result.put("msg", "success");
		result.put("data", "Wellcome to xman's code world!");
		return result;
	}
	
	@RequestMapping("/page")
	public String gotoPage() {
		return "test";
	}
}
